package net.alpcontrol.bi.colligation.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import net.alpcontrol.bi.colligation.entity.InitialCharge;
import net.alpcontrol.bi.colligation.mapper.InitialChargeMapper;
import net.alpcontrol.bi.colligation.service.IInitialChargeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 丛庆
 * @since 2020-09-29
 */
@Service
@Transactional
public class InitialChargeServiceImpl extends ServiceImpl<InitialChargeMapper, InitialCharge> implements IInitialChargeService {

    @Autowired
    private InitialChargeMapper initialChargeMapper;

    /**
      *  分页查询
      * @param bootStrapTable
      * @param initialCharge
      * @return
      */
    @Override
    public IPage<InitialCharge> selectPage(Page<InitialCharge> page) {
        return initialChargeMapper.selectPage(page,null);
    }

    /**
     * 根据员工查询期初余额
     *
     * @param empNo
     * @return
     */
    @Override
    public List<InitialCharge> getInitialChargeByEmp(List<String> empNo) {
        Map param = new HashMap();
        param.put("empNo",empNo);
        return initialChargeMapper.getInitialChargeByEmp(param);
    }
}
